<?php
/* @var $this TransferController */
/* @var $model Transfer */
$this->breadcrumbs=array(
	'部门调动',
	'调动详情'=>array('transfer/detail?id='.$data['transfer']->id),
);
?>
<span class="page_h3">编辑</span>
<div class="detail_div" >
    <div class="form">
    	<form name="c_form" id="c_form" action="<?php echo Yii::app()->request->baseUrl.'/transfer/edit'; ?>" method="post">
        <table class="c_table" cellspacing="1" cellpadding="1" border="0"> 
        	<tr>
                <td width="100"  align="right" class="td-blue">单 号：</td>
                <td>
                <select id="status" class="mid_select2" name="status">
                    <option <?php if($data['transfer']->status==-1) {?> selected="selected" <?php } ?> value="-1">驳回</option>
                    <option <?php if($data['transfer']->status==-2) {?> selected="selected" <?php } ?> value="-2">取消</option>
                </select>
            	</td>
            </tr>
            <tr>
                <td align="right" class="td-blue">调动人员信息：</td>
                <td>
                <table class="c_table">
                	 <tr> <td class="td-blue">人员 </td> <td class="td-blue">基本信息</td> <td width="300" class="td-blue">职级信息</td></tr>
                    <?php foreach($data['transfer']->user as $v)
						  { ?>
                      <tr> 
                        <td><?php echo $v->c_username ?></td> <td>工号：<?php echo $v->unique_id ?><br />邮箱：<?php echo $v->username ?><br />入职时间：<?php echo $v->entry_point ?></td>
                        <td>属性：<?php echo HrPositionAttribute::getInfoById($v->old_attr_id,'title'); ?><br />L：<?php echo HrPositionLevel::getInfoById($v->old_L,'name'); ?><br />M：<?php echo HrPositionLevel::getInfoById($v->old_M,'name'); ?></td>
                      </tr>
                    <?php }?>
                </table>
                </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">说 明：</td>
                <td>  <?php echo $data['transfer']->note ?> </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">原 部 门：</td>
                <td> <?php echo $data['transfer']->from_department_name; ?> </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">新 部 门：</td>
                <td> <?php echo $data['transfer']->to_department_name; ?> </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">发 起 人：</td>
                <td colspan="3" id=""><?php echo $data['transfer']->start_c_username;?></td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">当前审核人：</td>
                <td colspan="3" id=""> 
                <?php
				echo $data['transfer']->next_c_username;
				?>
                </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">审核流程：</td>
                <td colspan="3" id=""> 
                <?php
				if(isset($data['transferProcessCUsernames'])) {
					$count = count($data['transferProcessCUsernames']);
					foreach($data['transferProcessCUsernames'] as $k => $v)
					{
						echo $v;	
						if($k < ($count-1))
							echo '<img src="'.Yii::app()->request->baseUrl.'/global/img/icons/arrow_right.gif" />';
					}
				}
				?>
                </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue">生效时间：</td>
                <td colspan="3"> 
                <?php echo date("Y-m-d",$data['transfer']->effective_time); ?>
                </td>
            </tr>
            <tr>
                <td  align="right" class="td-blue" valign="top">流程记录：</td>
                <td colspan="3" id=""> 
                <?php
				if(isset($data['transferIndex'])) {
					echo '<table class="c_table">';
					foreach($data['transferIndex'] as $v)
					{
						echo '<tr>';
						echo '<td width="50">'.$v['c_username'].'</td><td width="50"> '.$v['action_name'].'</td><td> '.$v['note'].'</td><td width="120"> '.$v['action_time'].'</td>';
						echo '<tr>';
					}
					echo '</table>';
				}
				?>	
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center"> 
                <input type="hidden" name="id" id="id" value="<?php echo $data['transfer']->id ?>" />
                <input type="hidden" value="<?php echo Yii::app()->request->csrfToken; ?>"  name="YII_CSRF_TOKEN" /><input type="submit" class="c_button" id="form_submit" value=" 确 定 " />
                <input type="button" class="c_button" onclick="javascript:history.go(-1);" value=" 返 回 " />
               
                </td>
            </tr>
        </table>
        </form>
    </div><!-- form -->
	<br />
</div>